#pragma once
#ifndef SPRITE_H
#define SPRITE_H

#include <HAPI_lib.h>
#include "Rectangle.h"


using namespace std;
class CSprite
{
private:
	BYTE* pntSprite;
	int spriteWidth;
	int spriteHeight;
	int widthFrame;
	int heightFrame;
	int nbOfFrame;
	int nbOfFramePerRow;
	//int nbOfFramePerColumn;

public:
	CSprite(void);
	~CSprite(void);
	bool CSprite::initialise(const string &adrSprite);
	bool CSprite::blitSprite(BYTE* const screen, int positionX,  int positionY, int screenWidth, 
							int screenHeight, bool transparency)const;
	bool CSprite::blitSpriteBlending(BYTE* const screen, int positionX,  int positionY, int screenWidth, 
							int screenHeight, int transparency)const;
	bool CSprite::blitTextureClipped(BYTE* const screen, int positionX, int positionY, int screenWidth, 
									int screenHeight, CRectangle source, bool transparency)const;
	bool blitTextureClippedBlending(BYTE* const screen, int positionX, int positionY, int screenWidth, 
									int screenHeight, CRectangle source, int transparency)const;

	//gettor
	BYTE* CSprite::getPntSprite(void)const;
	int CSprite::getSpriteWidth(void)const;
	int CSprite::getSpriteHeight(void)const;
	int CSprite::getWidthFrame(void)const;
	int CSprite::getHeightFrame(void)const;
	int CSprite::getNbOfFrame(void)const;
	int CSprite::getNbOfFramePerRow(void)const;
	//settor
	void CSprite::setPntSprite(BYTE* pointer);
	void CSprite::setSpriteWidth(int spriteWidth);
	void CSprite::setSpriteHeight(int spriteHeight);
	void CSprite::setWidthFrame(int widthFrame);
	void CSprite::setHeightFrame(int heightFrame);
	void CSprite::setNbOfFrame(int nbOfFrame);
	void CSprite::setNbOfFramePerRow(int nbOfFramePerRow);
};

#endif